<?php

namespace app\stock\controller\Manage;

use think\Controller;
use think\Db;

class Receive extends Controller
{
    // 模型
    protected $ReceiveModel = null;

    public function __construct()
    {
        parent::__construct();

        $this->ReceiveModel = model("Business.Receive");
    }

    public function index()
    {
        $applyid = $this->request->param('applyid', 0, 'trim');

        $receiveData = $this->ReceiveModel->with(['business'])->where('applyid', $applyid)->order('applytime DESC')->select();

        if (!$receiveData) {
            $this->error('暂无数据');
        }

        $this->success('查询成功', null, $receiveData);
    }
}
